<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/public/inc/tags.jsp"%>
<html>
<head>
    <jsp:include page="/public/inc/head.jsp"/>
</head>
<body>
<div id="header" class="navbar navbar-static-top" role="navigation">
    <jsp:include page="/public/inc/top.jsp"/>
</div>
<div class="container-fluid" style="margin-top:5px;margin-bottom:60px;">
    <div class="row">
        <jsp:include page="/public/inc/menu.jsp"/>
        <div class="col-xs-12 col-sm-10">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <div class="media">
                        <div class="media-body">
                            <span class="glyphicon glyphicon-list"></span>日志管理
                        </div>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="form-inline">
                        <form action="/system/upms_log/list">
                            <input type="text" class="form-control" name="username" placeholder="用户名"/>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <button type="submit" class="btn btn-primary">筛选</button>
                        </form>
                    </div>
                </div>
                <div class="table-responsive">
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>操作用户</th>
                            <th>请求路径</th>
                            <th>请求类型</th>
                            <th>耗时</th>
                            <th>IP地址</th>
                            <th>操作时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="l" items="${list}" varStatus="status">
                            <tr>
                                <td>
                                        ${status.index+1}
                                </td>
                                <td>
                                        ${l.username}
                                </td>
                                <td>
                                        ${l.uri}
                                </td>
                                <td>
                                        ${l.method}
                                </td>
                                <td>
                                        ${l.spendTime}ms
                                </td>
                                <td>
                                        ${l.ip}
                                </td>
                                <td>
                                        <fmt:formatDate value="${l.gmt_created}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <div class="panel-footer">
                    <p:pagination url="/system/upms_log/list" total="${listSize}"/>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="/public/inc/bottom.jsp"/>
</body>
</html>